<template>
	<view class="personal row">
		<view class="cellBox">
			<van-cell-group>
			  <van-cell title="头像" >
					<image 
					style="width: 60rpx;height: 60rpx;" 
					:src=" dataInfo.headPortraitImg || require('@/static/noIng.jpg')"
					@click="show=true" 
					mode=""></image>
				</van-cell>
				<van-cell title="姓名" :value="dataInfo.name"  />
				<van-cell title="性别" :value="dataInfo.gender == 0 ? '保密': dataInfo.gender == 1? '男' : '女'"  />
				<van-cell v-if="dataInfo.birthDate && dataInfo.birthDate != 'null'" title="出生日期" :value="dataInfo.birthDate"  />
				<van-cell v-if="dataInfo.phone && dataInfo.phone != 'null'" title="手机号" :value="dataInfo.phone"  />
				<van-cell v-if="dataInfo.cardNo && dataInfo.cardNo != 'null'" title="身份证" :value="dataInfo.cardNo"  />
				<van-cell v-if="dataInfo.email && dataInfo.email != 'null'" title="电子邮箱" :value="dataInfo.email"  />
				<van-cell v-if="dataInfo.nativePlace && dataInfo.nativePlace != 'null'" title="籍贯" :value="dataInfo.nativePlace"  />
				<van-cell v-if="dataInfo.education && dataInfo.education != 'null'" title="文化程度" :value="dataInfo.education"  />
				<!-- <van-cell v-if="dataInfo.wechat && dataInfo.wechat != 'null'" title="微信号码" :value="dataInfo.wechat"  /> -->
				<van-cell v-if="dataInfo.specialty && dataInfo.specialty != 'null'" title="特长" :value="dataInfo.specialty"  />
				<van-cell v-if="dataInfo.nation && dataInfo.nation != 'null'" title="民族" :value="dataInfo.nation"  />
				<van-cell v-if="dataInfo.school && dataInfo.school != 'null'" title="毕业院校" :value="dataInfo.school"  />	
				<van-cell v-if="dataInfo.major && dataInfo.major != 'null'" title="专业" :value="dataInfo.major"  />
				<van-cell v-if="dataInfo.workUnit && dataInfo.workUnit != 'null'" title="工作单位" :value="dataInfo.workUnit"  />
				<van-cell v-if="dataInfo.address && dataInfo.address != 'null'" title="通讯地址" :value="dataInfo.address"  />
			</van-cell-group>
			<van-overlay :show="show" @click="show=false">
				<van-transition
					:show="show"
				>
					<van-image
					  width="18rem"
					  height="18rem"
					  fit="contain"
					  :src="dataInfo.headPortraitImg || this.$storage.getItem('avatarUrl') || require('@/static/noIng.jpg')"
					/>
				</van-transition>
			</van-overlay>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'personal',
		data() {
			return {
				show: false,
				dataInfo: {}
			}
		},
		onLoad() {
			this.getDataInfo()
		},
		methods: {
			getDataInfo() {
				this.dataInfo = this.$storage.getItem('roleDataInfo') || this.$storage.getItem('userInfo').user
			}
		}
	}
</script>

<style lang="scss" scoped>
	.personal {
		width: 100%;
		position: relative;
		/deep/ .van-cell__value {
			color: #000;
		}
		/deep/ .van-transition {
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}
</style>
